Skip to content

Bump ruff to 0.2.0#114932

Merged
AlexWaygood merged 1 commit into
python:mainfrom
AlexWaygood:ruff-bump
Feb 2, 2024
Merged

Bump ruff to 0.2.0#114932
AlexWaygood merged 1 commit into
python:mainfrom
AlexWaygood:ruff-bump

Conversation

@AlexWaygood

Copy link
Copy Markdown
Member

Fix these DeprecationWarnings if you run ruff directly on Lib/test or Tools/clinic (which unfortunately you don't see if you run it via pre-commit, since pre-commit swallows all output from the underlying hook unless the hook returns a non-zero exit code):

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `Lib\test\.ruff.toml`:
  - 'select' -> 'lint.select'
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `Tools\clinic\.ruff.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'unfixable' -> 'lint.unfixable'

@AlexWaygood

Copy link
Copy Markdown
Member Author

Tools/clinic/.ruff.toml doesn't exist on the 3.11 branch, but Lib/test/.ruff.toml does, so backporting to 3.11 can't be done automatically :/

I think the 3.12 one should be fine, though 🤞

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hugovk

hugovk commented Feb 2, 2024

Copy link
Copy Markdown
Member

(which unfortunately you don't see if you run it via pre-commit, since pre-commit swallows all output from the underlying hook unless the hook returns a non-zero exit code)

(Or unless you run with the --verbose flag.)

Tools/clinic/.ruff.toml doesn't exist on the 3.11 branch, but Lib/test/.ruff.toml does, so backporting to 3.11 can't be done automatically :/

Sounds like we should add Tools/clinic/.ruff.toml to the 3.11 branch at the same time?

@AlexWaygood AlexWaygood merged commit 920b89f into python:main Feb 2, 2024
@AlexWaygood AlexWaygood deleted the ruff-bump branch February 2, 2024 21:04
@miss-islington-app

Copy link
Copy Markdown

Thanks @AlexWaygood for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 2, 2024
(cherry picked from commit 920b89f)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@bedevere-app

bedevere-app Bot commented Feb 2, 2024

Copy link
Copy Markdown

GH-114935 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Feb 2, 2024
AlexWaygood added a commit that referenced this pull request Feb 2, 2024
Bump ruff to 0.2.0 (GH-114932)
(cherry picked from commit 920b89f)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@AlexWaygood

AlexWaygood commented Feb 2, 2024

Copy link
Copy Markdown
Member Author

Sounds like we should add Tools/clinic/.ruff.toml to the 3.11 branch at the same time?

Hmm maybe... I don't think it'll pass on the 3.11 branch though... But maybe that doesn't matter, since we won't actually run the check in CI?

But it's pretty rare that we'll want to update the .ruff.toml file at the same time as .pre-commit-config.yaml, so this feels like it might be a bit of a "one-off" problem that maybe doesn't need a generalised solution?

@hugovk

hugovk commented Feb 2, 2024

Copy link
Copy Markdown
Member

OK, let's skip it for 3.11 :)

@bedevere-app

bedevere-app Bot commented Feb 4, 2024

Copy link
Copy Markdown

GH-115008 is a backport of this pull request to the 3.11 branch.

AlexWaygood added a commit to AlexWaygood/cpython that referenced this pull request Feb 4, 2024
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
@AlexWaygood AlexWaygood restored the ruff-bump branch February 22, 2024 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants